package com.Emotion.emotion.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.Emotion.emotion.mapper.EmotionAnalysisMapper;
import com.Emotion.emotion.domain.EmotionAnalysis;
import com.Emotion.emotion.service.IEmotionAnalysisService;

/**
 * 情绪分析Service业务层处理
 * 
 * @author wangtao
 * @date 2025-05-08
 */
@Service
public class EmotionAnalysisServiceImpl implements IEmotionAnalysisService 
{
    @Autowired
    private EmotionAnalysisMapper emotionAnalysisMapper;

    /**
     * 查询情绪分析
     * 
     * @param analysisId 情绪分析主键
     * @return 情绪分析
     */
    @Override
    public EmotionAnalysis selectEmotionAnalysisByAnalysisId(Long analysisId)
    {
        return emotionAnalysisMapper.selectEmotionAnalysisByAnalysisId(analysisId);
    }

    /**
     * 查询情绪分析列表
     * 
     * @param emotionAnalysis 情绪分析
     * @return 情绪分析
     */
    @Override
    public List<EmotionAnalysis> selectEmotionAnalysisList(EmotionAnalysis emotionAnalysis)
    {
        return emotionAnalysisMapper.selectEmotionAnalysisList(emotionAnalysis);
    }

    /**
     * 新增情绪分析
     * 
     * @param emotionAnalysis 情绪分析
     * @return 结果
     */
    @Override
    public int insertEmotionAnalysis(EmotionAnalysis emotionAnalysis)
    {
        return emotionAnalysisMapper.insertEmotionAnalysis(emotionAnalysis);
    }

    /**
     * 修改情绪分析
     * 
     * @param emotionAnalysis 情绪分析
     * @return 结果
     */
    @Override
    public int updateEmotionAnalysis(EmotionAnalysis emotionAnalysis)
    {
        return emotionAnalysisMapper.updateEmotionAnalysis(emotionAnalysis);
    }

    /**
     * 批量删除情绪分析
     * 
     * @param analysisIds 需要删除的情绪分析主键
     * @return 结果
     */
    @Override
    public int deleteEmotionAnalysisByAnalysisIds(Long[] analysisIds)
    {
        return emotionAnalysisMapper.deleteEmotionAnalysisByAnalysisIds(analysisIds);
    }

    /**
     * 删除情绪分析信息
     * 
     * @param analysisId 情绪分析主键
     * @return 结果
     */
    @Override
    public int deleteEmotionAnalysisByAnalysisId(Long analysisId)
    {
        return emotionAnalysisMapper.deleteEmotionAnalysisByAnalysisId(analysisId);
    }
}
